Skip to content

feat(google-genai): Gate prompt/response collection on data_collection option - #7139

Open
ericapisani wants to merge 1 commit into
masterfrom
py-2588-google
Open

feat(google-genai): Gate prompt/response collection on data_collection option#7139
ericapisani wants to merge 1 commit into
masterfrom
py-2588-google

Conversation

@ericapisani

Copy link
Copy Markdown
Member

Modify the GoogleGenAI integration to respect the data_collection config for controlling whether prompts, responses, and tool calls are captured in spans.

When data collection is enabled, the new gen_ai.inputs and gen_ai.outputs flags control what data is collected. When data collection is not configured, falls back to legacy send_default_pii and include_prompts settings for compatibility.

Refs PY-2588

…n option

Modify the GoogleGenAI integration to respect the data_collection config for
controlling whether prompts, responses, and tool calls are captured in spans.

When data collection is enabled, the new gen_ai.inputs and gen_ai.outputs flags
control what data is collected. When data collection is not configured, falls
back to legacy send_default_pii and include_prompts settings for compatibility.

Refs PY-2588
@ericapisani
ericapisani requested a review from a team as a code owner August 7, 2026 18:11
@linear-code

linear-code Bot commented Aug 7, 2026

Copy link
Copy Markdown

PY-2588

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

103937 passed | ⏭️ 6635 skipped | Total: 110572 | Pass Rate: 94% | Execution Time: 375m 51s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +2420
Passed Tests 📈 +2420
Failed Tests
Skipped Tests

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2476 uncovered lines.
✅ Project coverage is 90.11%. Comparing base (base) to head (head).

Files with missing lines (2)
File Patch % Lines
sentry_sdk/integrations/google_genai/utils.py 100.00% ⚠️ 3 partials
sentry_sdk/integrations/google_genai/streaming.py 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.02%    90.11%    +0.09%
==========================================
  Files          193       193         —
  Lines        25010     25045       +35
  Branches      9032      9068       +36
==========================================
+ Hits         22514     22569       +55
- Misses        2496      2476       -20
- Partials      1434      1429        -5

Generated by Codecov Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant